(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

double(0) → 0
double(s(x)) → s(s(double(x)))
half(0) → 0
half(s(0)) → 0
half(s(s(x))) → s(half(x))
-(x, 0) → x
-(s(x), s(y)) → -(x, y)
if(0, y, z) → y
if(s(x), y, z) → z
half(double(x)) → x

Rewrite Strategy: INNERMOST

(1) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(2) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

double(0') → 0'
double(s(x)) → s(s(double(x)))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
-(x, 0') → x
-(s(x), s(y)) → -(x, y)
if(0', y, z) → y
if(s(x), y, z) → z
half(double(x)) → x

S is empty.
Rewrite Strategy: INNERMOST

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

Innermost TRS:
Rules:
double(0') → 0'
double(s(x)) → s(s(double(x)))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
-(x, 0') → x
-(s(x), s(y)) → -(x, y)
if(0', y, z) → y
if(s(x), y, z) → z
half(double(x)) → x

Types:
double :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
half :: 0':s → 0':s
- :: 0':s → 0':s → 0':s
if :: 0':s → if → if → if
hole_0':s1_0 :: 0':s
hole_if2_0 :: if
gen_0':s3_0 :: Nat → 0':s

(5) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
double, half, -

(6) Obligation:

Innermost TRS:
Rules:
double(0') → 0'
double(s(x)) → s(s(double(x)))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
-(x, 0') → x
-(s(x), s(y)) → -(x, y)
if(0', y, z) → y
if(s(x), y, z) → z
half(double(x)) → x

Types:
double :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
half :: 0':s → 0':s
- :: 0':s → 0':s → 0':s
if :: 0':s → if → if → if
hole_0':s1_0 :: 0':s
hole_if2_0 :: if
gen_0':s3_0 :: Nat → 0':s

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

The following defined symbols remain to be analysed:
double, half, -

(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)

Induction Base:
double(gen_0':s3_0(0)) →RΩ(1)
0'

Induction Step:
double(gen_0':s3_0(+(n5_0, 1))) →RΩ(1)
s(s(double(gen_0':s3_0(n5_0)))) →IH
s(s(gen_0':s3_0(*(2, c6_0))))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(8) Complex Obligation (BEST)

(9) Obligation:

Innermost TRS:
Rules:
double(0') → 0'
double(s(x)) → s(s(double(x)))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
-(x, 0') → x
-(s(x), s(y)) → -(x, y)
if(0', y, z) → y
if(s(x), y, z) → z
half(double(x)) → x

Types:
double :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
half :: 0':s → 0':s
- :: 0':s → 0':s → 0':s
if :: 0':s → if → if → if
hole_0':s1_0 :: 0':s
hole_if2_0 :: if
gen_0':s3_0 :: Nat → 0':s

Lemmas:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

The following defined symbols remain to be analysed:
half, -

(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
half(gen_0':s3_0(*(2, n281_0))) → gen_0':s3_0(n281_0), rt ∈ Ω(1 + n2810)

Induction Base:
half(gen_0':s3_0(*(2, 0))) →RΩ(1)
0'

Induction Step:
half(gen_0':s3_0(*(2, +(n281_0, 1)))) →RΩ(1)
s(half(gen_0':s3_0(*(2, n281_0)))) →IH
s(gen_0':s3_0(c282_0))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(11) Complex Obligation (BEST)

(12) Obligation:

Innermost TRS:
Rules:
double(0') → 0'
double(s(x)) → s(s(double(x)))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
-(x, 0') → x
-(s(x), s(y)) → -(x, y)
if(0', y, z) → y
if(s(x), y, z) → z
half(double(x)) → x

Types:
double :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
half :: 0':s → 0':s
- :: 0':s → 0':s → 0':s
if :: 0':s → if → if → if
hole_0':s1_0 :: 0':s
hole_if2_0 :: if
gen_0':s3_0 :: Nat → 0':s

Lemmas:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
half(gen_0':s3_0(*(2, n281_0))) → gen_0':s3_0(n281_0), rt ∈ Ω(1 + n2810)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

The following defined symbols remain to be analysed:
-

(13) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
-(gen_0':s3_0(n740_0), gen_0':s3_0(n740_0)) → gen_0':s3_0(0), rt ∈ Ω(1 + n7400)

Induction Base:
-(gen_0':s3_0(0), gen_0':s3_0(0)) →RΩ(1)
gen_0':s3_0(0)

Induction Step:
-(gen_0':s3_0(+(n740_0, 1)), gen_0':s3_0(+(n740_0, 1))) →RΩ(1)
-(gen_0':s3_0(n740_0), gen_0':s3_0(n740_0)) →IH
gen_0':s3_0(0)

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(14) Complex Obligation (BEST)

(15) Obligation:

Innermost TRS:
Rules:
double(0') → 0'
double(s(x)) → s(s(double(x)))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
-(x, 0') → x
-(s(x), s(y)) → -(x, y)
if(0', y, z) → y
if(s(x), y, z) → z
half(double(x)) → x

Types:
double :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
half :: 0':s → 0':s
- :: 0':s → 0':s → 0':s
if :: 0':s → if → if → if
hole_0':s1_0 :: 0':s
hole_if2_0 :: if
gen_0':s3_0 :: Nat → 0':s

Lemmas:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
half(gen_0':s3_0(*(2, n281_0))) → gen_0':s3_0(n281_0), rt ∈ Ω(1 + n2810)
-(gen_0':s3_0(n740_0), gen_0':s3_0(n740_0)) → gen_0':s3_0(0), rt ∈ Ω(1 + n7400)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

No more defined symbols left to analyse.

(16) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)

(17) BOUNDS(n^1, INF)

(18) Obligation:

Innermost TRS:
Rules:
double(0') → 0'
double(s(x)) → s(s(double(x)))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
-(x, 0') → x
-(s(x), s(y)) → -(x, y)
if(0', y, z) → y
if(s(x), y, z) → z
half(double(x)) → x

Types:
double :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
half :: 0':s → 0':s
- :: 0':s → 0':s → 0':s
if :: 0':s → if → if → if
hole_0':s1_0 :: 0':s
hole_if2_0 :: if
gen_0':s3_0 :: Nat → 0':s

Lemmas:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
half(gen_0':s3_0(*(2, n281_0))) → gen_0':s3_0(n281_0), rt ∈ Ω(1 + n2810)
-(gen_0':s3_0(n740_0), gen_0':s3_0(n740_0)) → gen_0':s3_0(0), rt ∈ Ω(1 + n7400)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

No more defined symbols left to analyse.

(19) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)

(20) BOUNDS(n^1, INF)

(21) Obligation:

Innermost TRS:
Rules:
double(0') → 0'
double(s(x)) → s(s(double(x)))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
-(x, 0') → x
-(s(x), s(y)) → -(x, y)
if(0', y, z) → y
if(s(x), y, z) → z
half(double(x)) → x

Types:
double :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
half :: 0':s → 0':s
- :: 0':s → 0':s → 0':s
if :: 0':s → if → if → if
hole_0':s1_0 :: 0':s
hole_if2_0 :: if
gen_0':s3_0 :: Nat → 0':s

Lemmas:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)
half(gen_0':s3_0(*(2, n281_0))) → gen_0':s3_0(n281_0), rt ∈ Ω(1 + n2810)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

No more defined symbols left to analyse.

(22) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)

(23) BOUNDS(n^1, INF)

(24) Obligation:

Innermost TRS:
Rules:
double(0') → 0'
double(s(x)) → s(s(double(x)))
half(0') → 0'
half(s(0')) → 0'
half(s(s(x))) → s(half(x))
-(x, 0') → x
-(s(x), s(y)) → -(x, y)
if(0', y, z) → y
if(s(x), y, z) → z
half(double(x)) → x

Types:
double :: 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
half :: 0':s → 0':s
- :: 0':s → 0':s → 0':s
if :: 0':s → if → if → if
hole_0':s1_0 :: 0':s
hole_if2_0 :: if
gen_0':s3_0 :: Nat → 0':s

Lemmas:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

No more defined symbols left to analyse.

(25) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
double(gen_0':s3_0(n5_0)) → gen_0':s3_0(*(2, n5_0)), rt ∈ Ω(1 + n50)

(26) BOUNDS(n^1, INF)